-- GENERATED SPELL FOR [Jalinde Summerdrake] --


function spell0_8214(pUnit, Event) --@Explosive Shot,n/a--
pUnit:FullCastSpellOnTarget(15495,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8214', 1000, 1)
end

function spell1_8214(pUnit, Event) --@Poisoned Shot,n/a--
pUnit:FullCastSpellOnTarget(8806,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8214', 2000, 1)
end

function spell2_8214(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8214', 678, 1)
end

function Sorts_8214(pUnit, Event)
local choix_sorts_8214 = math.random(0, 2)
if choix_sorts_8214 == 0 then
pUnit:RegisterEvent('spell0_8214', 1, 1)
end
if choix_sorts_8214 == 1 then
pUnit:RegisterEvent('spell1_8214', 1, 1)
end
if choix_sorts_8214 == 2 then
pUnit:RegisterEvent('spell2_8214', 1, 1)
end
end

function mob8214_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8214', math.random(1500, 3000), 1)
end

function mob8214_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8214_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8214_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8214, 1, 'mob8214_Action')
RegisterUnitEvent(8214, 2, 'mob8214_Leave')
RegisterUnitEvent(8214, 3, 'mob8214_Kill')
RegisterUnitEvent(8214, 4, 'mob8214_Die')
